<template>
<!-- 点击按钮, 改变3个li的顺序, 在头上的就到末尾. -->
  <div id="app">
    <ul>
      <li v-for="(item,index) in myArr" :key="index">{{item}}</li>
    </ul>
    <button @click="zou">走一走</button>
  </div>
</template>

<script>
export default {
  data() {
    return {
      myArr: ["帅哥", "美女", "程序猿"],
    };
  },
  methods: {
    zou(){
      let num=this.myArr[0]
      this.myArr.splice(0,1)
      this.myArr.push(num)
    }
  }
}
</script>